﻿using System;
using System.Text;

namespace BuddHa.Common.SMUtil
{
    public interface ISM2Dispatch : IDisposable
    {
        string Encrypt(string data, Encoding encoding = default, SMInEncodingTypes smInEncodingTypes = SMInEncodingTypes.Hex);

        string Decrypt(string data, Encoding encoding = default, SMInEncodingTypes smInEncodingTypes = SMInEncodingTypes.Hex);

        string Sign(string data, Encoding encoding = default, SMInEncodingTypes smInEncodingTypes = SMInEncodingTypes.Hex, SMOutEncodingTypes smOutEncodingTypes = SMOutEncodingTypes.Hex);

        byte[] Sign(byte[] data);

        bool VerifySign(string data, string sign, Encoding encoding = default, SMInEncodingTypes smInEncodingTypes = SMInEncodingTypes.Hex, SMOutEncodingTypes smOutEncodingTypes = SMOutEncodingTypes.Hex);

        bool VerifySign(byte[] data, byte[] sign);

        string CompressPubKey(string longPK);

        string UnCompressPubKey(string compressedPK);
    }
}
